package com.yy.springcloud.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;


@Configuration
public class ApplicationContextConfig {

    @Bean
    @LoadBalanced //默认自带的负载均衡    CLOUD-PAYMENT-SERVICE
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }
}
